// 用户图片加载失败，的自定义指令
export const imagerror = {
  inserted(dom, options) {
    dom.onerror = function () {
      dom.src = options.value
    }
  },
  componentUpdated(dom, options) {
    dom.src = dom.src || options.value
  }
}

export const imagerror1 = {
  inserted(dom, options) {
    dom.onerror = function () {
      dom.src = options.value
    }
  }
}

export const imagerror2 = {
  inserted(dom, options) {
    dom.onerror = function () {
      console.log('options:', options)
      dom.src = options.value
    }
  }
}
